Cleaned up add_metadata.
Merge conflict.