Setup based on dome and added dom loaded events