rewrote most of the map loading code. issue resolved.

TODO: Heavy cleanup