Integrated SearchTree with backend

Refined code, fixed some extraneous data collection