Fix eslint errors (space-infix-ops).
Fix eslint errors (new-cap).
Fix eslint errors (semi).
Fix eslint errors (complexity).
Fix eslint errors (max-nested-callbacks).