Game Management refactoring, improved tests, optimizations, and bugfixes