Implemented and tested instance.toObject()