refactor game controls.