refactoring the heuristics to be more configurable and improve the time to load comment_classes