Add smart pane switching