Refactored communication, so that the device dictionary being sent across is more standard.