Refactoring, and added InferCAT