Added model attributes gathering (including refs)