Completed Exercise 1.7: Implemented the 'remove_entry' function