Just a quick progress update - I've now added code to wrap constants in the classes they're defined in, and also to use the parameter names from the original methods in all cases (except when there isn't a parameter name specified!) No new patch right now - I need to fix something which happens to work OK for Xapian, but won't in general. Cheers, Olly