and move builting fixes for rewriting
sketch of pattern-matching outer visitor