Validations and testing added