Implemented the get_factoid function. add_factoid now checks for a factoid with a matching key and deletes it