Add implementation for ObjectType and Collection, plus improvements.