Finish adding test. Make small refactoring in models.