Adding a base-pane index too.
Tidying up a bit.