cleaned up Main

made main a little less cluttered.  consolidated some functionality.
Merge pull request #3 from pokemane/working

cleaned up Main