Add checking of match entries to loading.
Added checks for match id in loading the ids.
Added code to prevent reinserting of the same data.