Closer clock code. But still needs overarching logic changes.