More work on bug #7959.  Cleaned up the iop routines.