More loops. Less repeated lines.