Added separate batching layer
Hooked batching logic into stack