add confirm delete dialog option & tidy up