various edits, typos and cleanup

Lots of edits to improve readability, fix typos, fix code examples, and more.

I hope this is not too much for one PR.

Cheers!