Restructured some code to fix the transition bug when switching screens with buttons.