Moved almost everything out of main.py

Attempted to actually group things functionally rather than having it
all jammed in to a mega main.py. Went pretty well, looks like I was
lucky/wise enough to leave things basically decoupled!

Had to move the constants out in to their own class, other than that
this is a pretty pure moving-of-stuff-about. And it's probably my
imagination, but the game almost seems to run a little better now!