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

Fix example code bugs, clarify comments.