C++11 ification

Replace NULL by nullptr
Use make_shared<>
Some reindent.
Some C++11 lambda
Reformat MRW code.

Also use std::make_shared where applicable.