Refactor MapPage