more optimizations, simplified "root" concept, still bad O(N!) potential in wildcards