Added support for moving a task to a specific index.