Fixes #1, #7, #9.  Partially addresses #6