Description
Before doing the more significant changes to HMaster, it would benefit greatly from some cleanup, commenting, and a bit of refactoring.
One motivation is to nail down the initialization flow and comment each step. Another is to add a couple new classes to break up functionality into helpers to reduce HMaster size (for example, pushing all filesystem operations into their own class). And lastly to stop the practice of passing around references to HMaster everywhere and instead pass along only what is necessary.