Much-needed IO cleanup.