code cleanup in io library
structural source code cleanup