Refactored adGenerator to return enter/exit functions