Use a package level connection string. Separate stats into separate
functions. Code reorganization.