DRY methods for edit and delete.