Work done primarily by Francois Briere, thanks Francois.
Submitted by several, but going with Thomas Delaet's version. First of many I hope.