Revert "Change code formatting to fix some sonar major violations"

This reverts commit 7c8be075a4904d4ae09ad2d3d006987be2bdbcae.