Development -  latest updates for master

Mostly refactoring based on static analyzer feedback.