Replaced window.load with contentLoaded