Added time and sleep to the main loop to slow it down and not eat up cpu resources. May present a problem later on. Also cleaned up whisper code for the global scope.