clean up and refactor, add option --password2 to command line parser