Initial preventive tests

Have added tests for the models.