Refact ads controller