Added foldermodel, updated respository and metadata creation.  Added basic support to webapi for #3