Chapter 5 complete

Moving to unit tests for ease of re-running.