Created main class framework

Sections of the main class script are subdivided into global methods,
global variables and constants, and threads. Setup functions will be
called then the threads will be run.