Some fixes
Fix bug with crashing iterators while deleting.
Merge remote-tracking branch 'origin/master' into task4
In process...