Modification to router and abstraction to pageCollection for page sorting