Bugfixes + Subfolder detection for snippets and templates