improved argument parsing and some registry updates