Improved methods in Model and ModelTest.