Use hg.app after clearing innerHTML instead of my crappy attempt.