Added metadata saving capabilities.