updated snippets, and improved generation scrip