Rewriting classes