Moved the IO stuff into a separate bundle.
A little bit of code reorganisation