Add API documentation for Set and Map, and fix some corner cases.