Fix recursion: level, counts and loops
Remove trailing '/' when normalizing