Model unit tests

Finished unit tests for models.