Fix minor bugs and get rid of DOMContentLoaded.

Instead of DOMContentloaded handler, just run the initialisation
immediatelly.  The script is included at the end of the page any way.