reorganized menorah timekeeping code