Amended (de)serialization methods and fixed save bug.