Fix closing td tags in templates.
Add utils for ack, nack and adding delivery reports to messages.
Add tests for message statistics.