Encapsulate state in class for BriefTrainer