Move three global root paths to member variables.
Refactor cp_info.
Some trivial refactoring.
More refactoring. Most functions now private members, and other cosmetic changes.