Fix example code bugs, clarify comments.
Merge pull request #5 from acook/master

Fix example code bugs, clarify comments.