refactored Todos class a bit