Added DeviceRegistry, cleaned up tests