Inserted "game state" logic between "Main" and controllers, etc.
Also using requestAnimationFrame.