Fixed a faulty namespace use.
Made SearchResult implement Iterator and ArrayAccess.
Fixed a bug where constructing models by nested arrays would cause non-objects where objects are expected in models.