Fix up some build issues that we had with the last commit
Abstract out the metadata provider infrastructure