Create main_class.php

In an effort to have something to show I made massive changes to this file.  Replaced the whole thing.  Lots to clean up here but I works.