Explanation for use of global vars, and a small 
example.