Factored dfe into multiple files and automated training data generation