Rough draft of Validate function

Created a first phase for validatation function.  Needs further testing.