Full test coverage for models.py
Minor pylint cleanups
AssertionError stuff => pytest.raises()
Merging in the models cleanup code