...and now I am here looking at this dirty stuff, which I had to completely rewrite. :-)