Refactored batch, the batch flow is better divided to the separated sub-flows