rewrote page transitions into a nicer OO design