Sorting and grouping of elements within menu. Changed to map so we can maybe output the group-names. They are currently just output as HTML comments.