Major optimizations require improving setImmediate() usage, the rest does not matter much