Enable registration and unregistration of different types of devices

Fixes #6