refactoring tasks app