Sort fields into sections and subsections