Fixed a bug in the task option and clean submodues

@TomFischer : Would you please merge this PR to mesh_partition?