Starting to fix sonar issues