Sonarfixes

Fixed some of the Sonar rule violations reported on http://ec2-67-202-19-4.compute-1.amazonaws.com:9000/dashboard/index/1?did=4 

Please review the commit af9d3d66c52431ff150f915ca50bfedc663fecc8 before pull. Other commits are minor changes.

Best regards,
Sapumal.