Refactoring UI to remove dependencies from running the gamej