in order to make the setup function easy to be read, can we move all this DOM initialization code to an independent function?