Fixes held for freeze

We wanted to freeze the master branch (see #43) temporarily to apply semi-major structural changes to the Device class.  These fixes were made post-freeze but pre-any work actually done.  I think we should be able to apply them before doing any changes, and they should cause only conflicts we'd already be making by changing Device.

Didn't want to actually push to master without consulting the others with possible outstanding changes (@CHerold @breschovsky @jqi-sr-lab), hence the branch and pull request.