Fix bug in set_url method. Move posts_per_page to settings.