SOURCE: refactored map parsing