Big refactoring of DefaultRewriteRule (name changed to RuleOfRewriteWith)