Pep8 whitespace
Disable pyflakes duplicate import warning
Change page_index_factory to use built-in type function
Add index_class_name argument to page_index_factory