refactor: move batch "unrolling" up one layer