Buttons handling, clock states