Added logic for parsing CLI arguments.