Corrections in various chapters.

Corrected code snippets. And included additional instructions where absent.