Added a comment and a big docstring on num_tasks