MapGenerator refactoring