Used JSHint to fix some minor issues.