fixed lots of sonar issues
replaced remaining tabs with spaces