refined reference property, reference queries
Added new unittests
rewrote tests, fixed reference query, misc fixes
modified _from_db method to allow for model nesting