Save correct time duration when the task is completed
Some refactoring and add command to list hours for all tasks