Added proper delete functionality