Added logistic/grad, arange, tests batch allocator.