restructured messages to divs