Better dropdown selection, plus unit tests