Added mechanism for selecting device types

Sorry about the extra changes in here, somehow my commit got mixed/repeated with the changes from the latest commits on master.

Also, I'm still getting the "Error checking merge status," but I did do a pull since the most recent commit on master.

If this pull request is somehow broken due to the above, let me know and I will try to figure out how to fix it (probably just redo the changes on a clean checkout of HEAD).