Fixed a bunch of minor things sonar didnt like 2