Refactor game model and controller