Typo fixes
Typo and formatting fixes
Fixed warning in doc example

Fixes gh-1306