Added documentation for configuring items per page

Also removed unnecessary scoping of constants.

Cherry picked from master.