Addressing a few issues pointed out by JSHint