[FIX](lint) Several non-desired global variables, unused variables, assignment/comparison error, wrong this in logging call, wrong argument name