Add class variances in Doc and WordCounter