Refactor return of todos