Moving pagination into separate module