Split the device manager library into a client and server part.