Port of base_bank based on PCatinean work

BTW I don't see a checksum check here. There is an error in error message