More documentation, plus a new unit test that I hadn't thought of before but which is obviously needed in retrospect.