Phil/iteration b1

Added validations to the model and fixed controller test.