Implemented the remove functionality