Add comments and a unit test.