improved types parsing and smart snippets