Removed the validation from the model as it doesn't belong there. Added more tests.