Change the iterator types to be auto.