Simplify task switching code even more by moving it to the only place where it's needed, on tasksGUI.