Run on DOM ready

Initialize the html code on DOM ready instead of runtime.