Migrate to STL containers/algorithms.