Remove global var declarations and remove console.log.