Added command line parser, added exit code.