Correct some pointers to window.parent, extract clock.js