Generalize remaining metadata methods and add clearing functions