Lots of cleanups for cert and kscope ad exchange #302