Simplified the example algorithms.