Removes dead code, indents code, and also adds a index partial for the root view instead of mixing it up with the search view