Fixed docs and changed typos in example