Added TourDistance(), Test() and several function templates necessary for genetic algorithm