Fix ads function, add index page for ads