Initial main.c

Basic main.c. Not done with options checking.
Merge pull request #2 from wxue/master

Initial main.c