Adding password parsing to command-line.
Moving config code into library.