Added function to clear core data