Added validations and minor changes