Merge pull request #309 from bastih/master

A bouquet of some random fixes, improvements and removals