Fixed unit-test errors (but not failures) in test_model
Fixed many unit-test errors (but not failures) in test_view