Finished game; need some code refactoring