Fix enterPresentationMode
Various coding style fixes
Remove setTimeout from rotatePages