Fix many static analysis warnings
Merge pull request #86 from InsolvencyService/static-analysis-fixes

Fix many static analysis warnings