Added support for reordering tasks