Support for body and header end handlers plus some more tests