Optimized Time class and removed old code