Made DeviceEvent comparable and changed code for adding current location
to a device to pass object rather than id.