Clean up use of deviceid

Signed-off-by: Tom Haynes <Thomas.Haynes@primarydata.com>