Remove dead code.
Warn if the code cannot generate a master branch.
Comment the code to increase my undersyanding. No logic changes.