Added code snippets and missing sections