First go at it. Like everything else I do, it needs documentation and tests/testing.