Refactor home page filtering in pages_controller

Thanks, didn't catch this error – `rake` seems to be only running cucumber!