various tweaks and fixes
Merge pull request #83 from pepf/master

various tweaks and fixes