Use task queue for sending messages
Better comments and imports