also default to first window and pane when there is only 1
Use a dictionary instead of 3 global vars
Cleanup
Set empty vars with defaults earlier

i.e., allow the pane completion to work after hitting enter
Default to first pane/window on empty input