DISCL-235: Code review Friday refactorings

This is preliminary draft review
No this actually works, see: http://stackoverflow.com/questions/4600567/how-can-i-delete-elements-of-a-stdmap-with-an-iterator