Updates and optimizations to tasks for re-indexing