Added better validation to the model
Merge pull request #139 from fluke777/validate

Added better validation to the model