Refactored IO. Now classes that include IO must implement read(buffer, length) and read(buffer, length).