Thank you for your contribution, much appreciated. Of course embellishing a 14 years old code is not an easy thing to do, it's quicker to rewrite it. I would personally consider writing a separate version for 4.0 from scratch and leave what has been there for posterity.