fix models to properly handle NoneType nodes
Initial run at some basic test code on models