Fixed broken MapParse::expand() function, fixed unit tests, and did some general cleanup