More batching and some JSON hacks