bin/map: Refactored to print document opening, contents, and closing in separate steps so they can be separated later
bin/map: Refactored to print document opening, contents, and closing in separate steps so they can be separated later