Refactor todo.coffee