Changed to c++1y and added compiler optimizations.