Add support for IOSelector and IOInvert.
Comment out some debug code.