Refactored todos to routes