Removed the C option parsing code and replaced with logic pulling from the c++ bits.
Start removing some of the global variables and replacing them with the parsed options.