Updated timeline formatting and refactored code