Refactored some more of pageDiscovery to call proper functions