sigint handler is properly restored, support for mini-batch learning added