Added command-line option parsing and version printing.