Added the all page retrieval option, also fixed buggy purge period code