code tidy + event bind for search box