Made tempalte inject into comments so that DOM can be valid before running