Added ModelTest and supporting code.