handle_listing now takes a single hash containing all the info it needs to figure out which pagination method you're using.  The helper takes care of working out which of the three options you've asked for and does the right thing.