Refactor all the snippets