Work on HTTP body writing, tidying up.