Removed transitions and made page-changing code easier to read