devices: switch to using node-style API (#44)