Code cleaning to match sonar compliance rules