(fix) Calculate exit_time immediately.
(docs) Format.
(refactor) Formatting.
Merge pull request #1 from zzmp/refactor/rewrite

Refactor/rewrite