Refactor ibf.