Moved the editor functionality into a GameEditor class (the name isn't very good)