refactoring pbuffers to prevent misuse
refactored tests
refactored pbuffer tests passing
tests passing