Further cleanup. Started work on range_algs.
Merge commit.