Fix a few bugs and continue fleshing things out

Moved some functions around to provide more intuitive ordering, added a
"set_game_mode" function, continued fleshing out the game's menu
functionality, and fixed a few compile-time errors.