Cleaned up driver.sh to use functions.  Refined some of the printf statements