Refactored PagesController, separating data retrieval to separate methods.
Corrected getPagesWithNullValue test to use PagesController.

Signed-off-by: bhill2 <bjsrhill@gmail.com>