Fixes #186.

Also added a method to ModelObject that prints the object's subgraph.