misc refactoring, ad rotation