refactoring loadObjects to call scene.add and scene.remove only when necessary