Moves domReady function