Fix BananaPhoneBuffer and add unit tests