First real homework

All tests passing.