Fix instance switcher labels

fixes #97 on github.

Logic was totally wrong for deciding which label to use.

Refactor a bit to be as DRY as possible.