Bug fixes for TSP. Main issue was that arrays are 1-indexed but bits are 0-indexed (by left shift).