Reordered loop, changed lines without strength to just not have a 'str' field. Should run slightly faster and produce smaller files.