More progress on rewroting