Added ability to specify device with command line arguments