Fixed an issue with the summary
Changed pagination so that it is done db server side