remove master adverts switch; take out query string generation from document-write