Add general method for message handlers
Convert existing message handlers to use new method