Further simplification of metadata internals, with some TODOs for
further work