Debugging bestPages and supporting methods

Fixed null pointer errors and did some testing