Guide fixes

Guide fixes, some only on style, some needed to make code run.
Hope it's fine to bundle them as single pull request.