Configurable retention period

Minor: PEP8
Feature: Add configurable retention period