Refactoring sonar

Reducing number of violations thrown by Sonar. 

Includes - magic numbers, unused imports, chars instead of strings, and more.