slackner, puk, and Andre_H gave me a ton of help over IRC over the past couple of days (most of all slackner). The revised code is sitting in https://github.com/alexhenrie/wine/commits/master so that more people can review it, but I think it has a much better chance of meeting Alexandre's standards now.
-Alex