Added global variables and variable name changes. Added comments to
help organization