coding standards and simplification of else cases as well as some minor fixes
simplify else cases
Merge pull request #1395 from dereuromark/master-cs

coding standards and simplification of else cases as well as some fixes