Add delete function as well (closes #32)