Update samples for book: https://leanpub.com/html5-javascript-thinking, chapter 3 and chapter 4