Refactored validation code; added 'user' module to test the validators