Re-order algorithms

This addresses #218