Unify selection list code