First draft of Clock code