Fixed many JSHint errors