first stab at ads

Do not merge yet,
For review only now
I don't like this caching/aliasing of undefined.