Move JavaScript before closing body