Moved the collected snippets from library to avoid syntax errors.
Saved few minor comments and corrections.