Initial commit: Copied over source code from map-gui to simplify