Changed to use more C++11 features.