fixed expiration-feature and minor refactoring
quick-clean