Some minor fixes towards making pandoc pdf generation work.
Replace ```C++ by ```cpp to mark C++ syntax highlighting.
More fixes to enable pdf generation.
Fix structure issues.