Updates from pull requests from Mathieu Boillat and Jimmy Rittenborg