Modify code to use c++11 features.