Reducing Sonar Violations and improving Formatting