Rewriting backend