Game controller refactoring

I splitted game controller into smaller classes and refactored some parts to improve readability, type safety, and simplicity of code.