Implemented delete functionality.