-Refactored serializing and deserializing lists and dictionary