Refactored and added task delete option