Restructured DeviceClient as independent library