Added proper command line argument parsing.