Refactor common code into device.py