Refactor bibref. Test it.