Test error message
Refactor validation
Minor corrections