Wrote a bunch, much of it untested.