Merge pull request #116 from kjetilk/master

Miscellaneous fixes.