Refactor dashboard with timeline class