Added JSHint options and fixed resulting errors