Cleaned up the receiveMessage method in Session.