Unless you've done the job many times before, you'll always end up with spaghetti code. Actually, at this point, you've only just started: what you have is the rough draft of a preliminary spec. Check out some of the other advice here and do some serious rewriting. And then some more rewriting, and then.... Personally, I'm never sure whether I get my code into really great shape or just get sick of rewriting it, but I do seem to get it right eventually.
Tackle the problem from two ends. Try to get the overall design to make sense and pick small parts that handle simple chores and make them right. Then try to work your way from both ends towards the middle. And then work from the middle back towards both ends. Then from the top down, then from the bottom up. Then repeat the whole process.
Essentially, what you have is a collection of classes. Consider class A. If class A is built well, its the classes that use it will automatically work better, however good or bad they are. If class A uses classes well, those used classes will do more, however good or bad they are. So organize your classes as best you can, then make sure each is the best class it can possibly be.
It is important to get it as right as you can. Bad code will haunt you until the day you throw it out. With software, a bit of extra polishing always pays off. (Unless no one ends up using the code....)
To sum up: check out the actual advice given in the other answers, then rewrite your code till you get something you like.