Allow pagination functions to specify column names - minor refactoring