fixed services.
Added twig function for paginator.