Refactor metadata file structure to something more logical.