Added conversion to/from plain objects