E1S7: some progress on the rewrite