Added a delete function to remove object from localStorage