Improvements to the IO class
Flow improvements, added comments, example updates