Separated page manipulation and game logic; made code more DRY
Major refactoring: separated code into model and controller