add curly brackets around oneliner if statements
fix range check of iterators
make destructor virtual
Merge branch 'develop' into 52n/master