Lots of fixes, extend out list-devices example