Creating tests and fixing model.