In debug mode display the number of tags found
Minor refactoring
Improve caching