Minor code cleanup in io