Remove trailing whitespace
Fix some typos in the API reference
updating api-reference.md to match api.md on webpage.
Merge remote-tracking branch 'alco/doc-typos'

Conflicts:
	api-reference.md