Change logic of annotation_checker and class_scanner to reduce size