Updated chapter 1 and 2 from new commits by coderoshi.