Add spec for validations and other minor fixes