Changed library code to use 'auto' for iterators.