Fix up logging
Improve stanza parsing
Add specific clause for delayed messages