Add Device* param to important functions