Adapted some c++11 syntax