[TASK] More code cleaning

I found some more flaws in docblocks, incorrect variable names or return values. No biggies though.