Merge pull request #134 from bastih/master

Some more small cleanups and misc changes