Fix examples and sync documentation

Fixes all examples, with a few minor changes. Also fixes some github flavored markdown stuff in the generated documentation.