Code fixups.
Added some testing code for Model.