minor improvements

* Changed the init code to work as a dependency.
* Added patterns for passing binary to open and close (instead of iolists).
* Added patter for passing iolists into reply instead of just binary.