JSHint errors fixed