Move main code into function to avoid scope issues
Move main code into function to avoid scope issues

Any variable defined in the `if __name__ == "__main__" segment becomes a
global. This can lead to oversights when passing variables to other
functions in the same file. By putting the main code into its own
function, the scope of variables defined in it is limited appropriately.

sometoby/dscmstat.us,sometoby/dscmstat.us,sometoby/dscmstat.us