Tweaks to expansion to minimize the number of state transitions applied to the underlying state-machine during node expansion