Merge pull request #58 from blabaere/master

Makes the read function write to the buffer directly