Rewrite main-reduce loop
Fixes
Do not remove anything
Fixed core engines: js, css, html