Added doc generation, and nested collections