Minor internal refactoring and renamings

Noticed that I’ve used CPS for handleWriteRequest, so be explicit in the
name of things. Define an explicit type, since that seems like
self-documenting code.
Merge pull request #20 from alphagov/feature/minor-cleanup

Minor internal refactoring and renamings