Moved game logic from view into model.
Preserved logic (no change yet), simply moved it around.