changes requested in code review, minus the big change
changed #batch to #task, added BatchManager class and doc