Refactored constructor to use argc/argv.