device.py: comments improved