Adds left and right paging functionality