Implements type 1, type 2 group tree searches.