JSHint enabled, detected problems fixed, issue #4 solved