Reworked the map editor