Corrected a mistake in the output.
Brought tquery back to life.
Implementation of 'trail search'.