Made the map loading code a bit more streamined.

I'm using small steps here as it is very sensitive.