Refactored - handle timeout in the Timeline class