Added the Rewriter class