Restructing data for use in mustrache templates.