Works on monadic rewrite/simplification of engine.