Rewrite of to_dict. _as_dict removed