Added more validation rules and magic