Homework Assignment 2

Assignment rewrite to meet taught "function" guidelines.
Avoiding Global variables.  Passing variables by reference.  Increasing
function modularity.