Fix img naming for the ads and improve the ad code