Fix some mistakes in the api docs

Quoting style is now consistent and got rid of some typoes in the code snippets.