Tweaked transition code
Added forEachView()