Fix: JSHint errors - mainly just trailing white space, but a couple of
leaking variables as well