Added tests and validations