Fix incrementing variables; reformat