Improve bindings and add buffer interface.