Now the script runs before the page is displayed for better performances.