index: use webmodules for Range/Selection stuff

Using "selection-set-range", "selection-is-backward", "current-range", and "current-selection" modules to maintain "backwards" selection and DRY up the code a little bit.
Type inference should take care of this, no?