Added dialog boxes for error and delete confirmation.