Load/export map data and code refactoring