Email Validation and refactor of controller