Add homework 2 tests and fix _some_ of the code