Added notion of Rewrite that replaces ScopePhase