Reorder var settings and loops