Added pickle_metadata
Change pickled metadata's structure