Updates to edit and delete functions