Refactored serialization of objects, added serialization of graphical parts