Refactor some small parts, Add Test for GameInstance