Refactored the game controller

This cleans up the game controller pretty thoroughly.