Added functionality to turn off external clock