Refactoring the IOIO IO stuff