cleaning up test delete logic a bit to provide better gui usability