Fixed most unit-tests for model