Added validations and related tests