Made restriction of retention_period values configurable.
Cleanup imports.