c++11ify and remove redundant statements