Cleanup issues from #99 and #100

First commit supersedes #100 and fixes #97.  Second commit supersedes #99 and Fixes #98