Fixing metadata models
more metadata model changes
Merge branch 'master' into newdb