Moved code into snippets/ folder.