Changed to_dict() and from_dict() methods minimize output