Could you maybe add a separate `before_filter` to set the previous page and skip that before filter on actions you don't want to store?  I think that would help clean up some of this code.  What do you think?