Page navigation

Allow the user to navigate through the pages when refining search.
@justinvdm Split the code out into functions.