remove console.log() and just a bit of code style cleanup