Welcome to the Ranch.
A few tips on how to get the most out of our site:
1) don't post 80+ lines of code and say "Fix this up. Thanks!" I guarantee that over 99% of the folks who read a post like that will immediately move on to the next
thread.
2) ask specific, directed questions. Where EXACTLY do you need help? Does the code you posted compile? Run? do 80% of what you need? What does it do right, what does it do wrong?
3) Please properly format your code. Code that is not indented is EXTREMELY hard to read, and those 1% who might attempt to read your code will probably stop once they realize it's not formatted right.
4) Make it as easy as possible for someone to help you. Everyone here has limited time to give. The less time they have to spend trying to figure out what help you may need, the more likely they are to be able to solve your problem.