Move code around; no functional changes.
Timeout mechanism.