MDL-43089, tidying up code related to repaginate popup