Refactored todo list to add a class