Adding a batch framework