Make it a bit more modular, add support for custom ad parameter passing