addGameObject method updated and code cleaning