Merging Thierry's work for him to continue working on the up to date version