io code cleanup and test