Use C++11 range-based foor loops and auto, where possible.