How did the Roman Catholic Church influence Western European society during the Middle ages?