@Steve it is definitely something I want to improve.
I've got a different idea in progress, which is to use chosen for prefix selection as it solves the issue of what the heck to display when multiple prefixes are selected and the dropdown is not open.