Port VS to $LATEST_REWRITE