Add parsing of command line options
More error checking in init_profile()