Support for assorting nodes by type.
Implemented map writing.
Add test cases for Map writer.
More test cases for map writer.