Refactor javascript, modify todoitem only when it is saved correctly
Refactor javasript, use ToDoPlugin namespace
rename path to pageid