Moved GetMap function into it's own file