WIP: more metastore work.