ads cleaned code