Uses test files. Also keep track of search_cost. Added delete tree