bib-check: begin refactor