Several fixes / improvements:
- Added support for deadlines
- Made Write compatible with io.Writer
- Better doc
- Better tests