refactored main.c so the main function isn't so big
refactored main.c so the main function isn't so big

polaco1782/Craft,UIKit0/Crust,UIKit0/Crust,bdesemb/Craft,DanielOaks/Craft,polaco1782/Craft,naxIO/magebattle,Henningstone/client,omnus/Craft,nathanial/VGK,satoshinm/NetCraft,fogleman/Craft,Henningstone/client,twetzel59/CraftNG,fogleman/Craft,fogleman/Craft,dragonly/client,nathanial/VGK,a101010/Craft,twetzel59/CraftNG,DanielOaks/Craft,satoshinm/NetCraft,dragonly/client,nCore/Craft,konstructs/client,bdesemb/Craft,nathanial/VGK,nCore/Craft,omnus/Craft,naxIO/magebattle,a101010/Craft,dragonly/client,konstructs/client,Henningstone/client,konstructs/client,twetzel59/CraftNG,satoshinm/NetCraft,omnus/Craft,satoshinm/NetCraft,satoshinm/NetCraft,a101010/Craft