id-set: add bound-id sets
set-id: clean up code