Tidy algorithms. Refs #8445.

- Used auto when possible for cleaner code.
- As most of the algorithms only make use of the catalog to invoke a specific method I now do this directly rather than in two steps.