test fixes and more generic Buffer