Fixed some sonar/code-climate issues