Move duplicate code into SelectorBox class