API: code examples broken or with non-standard style
Created by: agh1
A lot of the code examples in the API pages are bad. Many have poor style, so they're a bad example for beginners. Worse, a number are missing closing parentheses, so they won't even work. This fixes those.