Added test for leaving a tour. Hash functions modified to avoid cyclic
referencing