Merge pull request #21 from bconway/miscfixes

Misc. fixes