Imporoved functionality of delete and edit