Modular clock.

Unverified - need to clean up output processes.