Object-oriented program structure for main()

Restructured the main program to use a class to store its' globals,
since it's much less ugly than the C++-style way of doing things, and
split up each step of the program's startup process into their own
functions, allowing Python to find appropriate times to do GC object
cleanup.
OO structure for config