Validations and minor fixes