merge style improvements by @WouterJ, fixes #42