cleaned up map loader