CS Fixes, phpdoc improvements and some unused use statements removed

Sorry for all the changes, but I went through all code and did small fixes in each file. I hope it's useful.