Fixes bug where case-insensitive searches would return the lower-cased search version of the winner. Delints per JSHint.