Move totalPages out from initialParams dictionary