Rewrite tooling with Q