Added support for unregisterDevice

Added support for unregisterDevice