Updated & fixed delete functionality