Added initial handler code for new messages.