follow the io interface, lots of cleanup
Stable release 1.0