Implement code review from Pierre from previous commit f6d97b36dfefa1c4b5610f9f45642b0b81ebbb16