JSHint compliance and minor fix