Refactor 'device' to 'unit' for clarity.