Enh: refactored bookkeeping controller code