Added TSP example and reorganized code