refactored core.clj and timeline.clj