refactoring todo app, would like to add tests