took out unused variables and adlibregister
declared all undeclared variables because of adding opt 'mustdeclarevariables' for clarity once the program gets larger
fixed global variable formatting
comments