Implementation is mostly complete; still writing unit tests.