Cleaned up for loops with simpler container access.