Added pages after treshold to [GroupChildren] an refactored it