Added better pagination...
More refactoring and movement...