Adding nested model support

Also, marked methods which came form other sources.