Refine notion of Buffer, more tests on decoding and whatnot
update regex to use new primitives