Lamda lifted find_waves_fast and simplified it.
Lambda lifted and modified topological sort of data deps for finding wavefronts.