Added option parsing and --version flag