Scoping issues

Removing the guess value from the global scope into the function scope.