Ported mixins over from the project I wrote this for.

No tests or integration into polyclay proper yet.