Remove the use of cbegin and cend. (c++11 features)