Move smell_class and smell_sub_class method to class level.