Changes to IO class and unit tests