Added download caching, and options for autocreating collections and types (that bit doesn't seem to work)