Just renaming device to device_id.  Makes things way more straightforward, as ... it's actually an ID!