Update code samples and fix chapter 11's code
Merge pull request #111 from vrinek/update-code-samples

Update code samples