Finished first version. WIP Data inconsistence when state of task is inactive, and the same is changed to DELETED.