refactored game model and controller