Source code for Chapters 7 and 8

Signed-off-by: Zlatozar Zhelyazkov <zlatozar@gmail.com>