moved pagination into a new CommonController so it can have it's own template and is easier to replicate on other pages