Reordered mapManager to be better laid out and easier to read.
Added lots of comments.