Code cleanup in ScreenManager