Blargh. Integrated the changes from fenoxo's version of the source back into the trunk.
Probably introduced lots of bugs. Let me know.