Minibatches and better shared variables