clean up some code, ready to make change to select-list