Added Validator to Engine and Added Tests