remove 'type' property in taskInfo.
change name & type property stack's root element.
create flush* functions.