Adding in affiliate model and regex looping