Changed main script to use the new adaptive retrival class