Added https://github.com/kristate 's C buffer changes without the README clobber and minor fixes.