Added main.h, added command line parsing.