Added validation to the important parts of models