comm-tool: add sub prototype for run()
comm-tool: pull message sorting to a subroutine
comm-tool: change message sort order

[date] => [date, end-date, direction, and message]