Ported utility classes from older implementations