Refactored evolve loop.