removes a bunch of unused code from the search template