Added chapter 3. Changed templates files.