Move the get device info to another js file