Fix some JSHint issues and trimming email addresses.