JSHint basic passover

Removes unused variables, variable redeclarations and bad linebreaks.