Add support for rewriting manifest for branch ads
Add support for detection of branch ads