This does many cleanups. Most prominently, - check the sents packet more strictly, - make the packets used in the test more readable, - unify callbacks.