improved toObject() for Relationships and restructred console