Wrote most of the initial unit tests