Large set of minor tweaks

This mainly covers PHPDocs, use statements, typos, return statement inconsistencies and dead code. Trying to help keep things nice and clean!