Replace unnecessary headings with more informative comments

Also rearrange the settings variables in a slightly more logical order.