Refactored Interruptable GPIO codes

Created two new Interface and hid implementation details as much as possible.