cleanup and refactor

Cleaned up and refactored a bunch of stuff.
Fixed bug with not being able to quit playing, and losing twice as much as you bet.