Code cleanup. shell script now uses c++11 dialect