Added Validation and Tests