I'll look around, but I might have to resort to copying their implementation (provided it is modular enough)