Moved deviceData functions to another file