Decouple NIA device logic from pyglet UI