Reorder algorithm subsections