Add comments.
Improve countdown logic of repairing.

fixed #4