JavaScript Validation code for index signup and suggestion box refactored.