Removed repeating global variables

The global variables should only be declared once within function scope. Keeping them there should throw an error around the lines of:

SyntaxWarning: name 'topIndicator' is assigned to before global declaration.
Merge pull request #1 from pjhampton/master

Removed repeating global variables