Move invariants to global scope.
Use Data::Section for templates.
Support to specify undef as unlimited pages.
Update some documentation for clarification.