refactored game to be much cleaner and modular