Add task batcher

This encompasses the changes from #73.