Removing redundant tasks