Extracted some more global variables into the globalvariables file.
Fixed the audio record.  Removed some debugging information