Refined device interface. Added device registration as a include error
work-around. Some code clean-up.