adding delete button to details page, editing storage of data in js file