Add delete artifact functionality, generalize delete button code.