Added a state to tasks and modified form, index etc