Progress on implementing GPIO interrupts.  Some additional code cleanup.