Fix and cleanup snippets