Map Editor refactoring