Scrutinizer patches

I Checked all Scrutinizer errors and solved the unused use statements. Every remove use statement is checked manually to be sure nothing will break with these changes. 

Other patches to fix the other issues will follow