bbrd: separate out block processing code