- code clean-up
- some more code comments
- fixed bug in the expire function, cleanup all_versions array during run. Otherwise it could happen that we try to delete already deleted versions