Moved existing code to use handleMessage. Did not change functionality
or interfaces at all.