Removed a bunch of unused local variables (PMD reports)

Signed-off-by: John May <john.wilkinsonmay@gmail.com>