Ran JSHint and made adjustments