updated device initialization mode and renamed some functions