Added a helper class to simplify serializing and deserializing objects