Thanks Robert and Eli for your review, and sorry for the delayed answer, it has been pretty busy at work lately.

You'll find attached a new version of the patch that should address all your remarks.

-Nico