Moves results function out to pages.inc file.