heartbeat: Allow running check function synchronously (in current
thread).
elevator: Small refactoring.
Add (prototype of) main for elevator.