Moves search page code back to html

And simplifies some selectors