CS and few scrutinizer issues fixes
Merge pull request #73 from linasmo/fix_scrutinizer_issues

CS and few scrutinizer issues fixes