refractoring Batch structure to more C++ like code