Add unit tests so students can refactor with confidence, and so that we practice what we preach, lab 2