Fix pagination and add search functionality

Pagination was showing a span containing 'Previous' even when on the first page and also 'Next' on the last page.
Added search form and a page to show results.