Small refactoring to tidy up test example.
Document deferral factories and do some minor tidying.