Meed to do a merge so the code is in an incomplete state. Anyway, I'm going to move the brush engine code to C++, the existing C code would never pass code review. I figure I can do this incrementally over the next month or two and then submit a patch.