Simplified the clock code.