Buffer support. Fixes #1