Wrote some code relating to the section generation dialog.