Taking the html out of js