Port of base_bank based on PCatinean work