Added new snippets and fixed some bugs.