Refactoring of the bz work