Logic simplification in lib/formatResults.js
Fix typos in formatResults.js