Fixed most JSHint errors