Todo list, refactoring