This is against . Please look inside for comments. Seems to work pretty well; it has already passed my basic test suite. --Andreas.