Fixed main

Main is HOPEFULLY complete now.