DISCL-235: Code review Friday refactorings

This is preliminary draft review
you have to run clear() explicitly ? Because of order of destruction ?