Reduced a lot of code using `map(|x| x)` trick.

In my previous commit, I had some enlightenment regarding lifetimes. I
realized that I had been thinking about lifetimes all wrong. After
changing the lifetimes, I could do `l.map(|x| x)` to get a list of
references all of which had the same lifetime as `l`. With this list of
references, I realized I could avoid some code duplication by having
more borrowing functions call their non-borrowing counterparts.