Merge pull request #1 from alxgnon/master

General style and compability improvements