Add instance filtering. Fix gitignore of templates