3.0 typos for API

- fixes some 'a -> 'an' mistakes
- close an Example code block