This looks very useful, thanks.

Does it have any tests?