Refactor DocLister::setIDs