+ Combined the separate device type functions into a single function that will handle both device types. This will simplify future changes to the script.