Updating message handling to accept arbitrary maps