Code cleanup
Adding the option to control page transitions