Adding cstewart87 mods for creating/using the available_device_id library function to determine devices as opposed to a glob.