Chore/model tests

Finished writing the tests for all the models. I didn't do any refactoring in this stage because I just wanted to get the tests working and didn't want to include too many changes in this PR.