remove unused code
improve design in search