Refactor: extract methods in SnippetManager.

Now it is more like a facade class.