to do list refactored using class methods and variables