Rewrote clock.js in readable format